package com.hiwhitley.easy.day17;

/**
 * Created by hiwhitley on 2016/9/11.
 */
public class FindTheDifference {
    public static char findTheDifference(String s, String t) {
        char c = t.charAt(t.length()-1);
        for (int i = 0; i < s.length(); i++) {
            c ^= s.charAt(i) ^ t.charAt(i);
        }
        return c;

    }

    public static void main(String[] args) {
        System.out.println(findTheDifference("abc", "adbc"));
    }
}
